import requests
headers = {"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"}
url = 'https://www.baidu.com/s?wd=yulidong&rsv_spt=1&rsv_iqid=0xd16e39860001e57d&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&rsv_dl=tb&rsv_sug3=8&rsv_sug1=6&rsv_sug7=100&rsv_sug2=0&rsv_btype=i&inputT=1719&rsv_sug4=1719'
parames = {'wd':'yulidong'}
info = requests.get(url,headers=headers)
print(info.text)
with open('baidu.html','w',encoding='utf-8') as f :
    f.write(info.text)
